/**
 * Created by guojanyu on 2016/3/31.
 */
myApp.config(function ($routeProvider) {
    $routeProvider.when('/userOrder/view', {
        templateUrl: 'userOrder/view',
        controller: 'userOrderListController'
    })
});
myApp.service('userOrderListService', function ($http) {
    var doRequest = function () {
        return $http.get('userOrder/list');
    }
    return {
        userOrderList: function () {
            return doRequest();
        }
    };
});
myApp.controller('userOrderListController', function ($scope, $location, $http,userOrderListService) {
    userOrderListService.userOrderList().success(function (response) {
        $scope.userOrders = response;
    });
});

